<?php
class Solicitudes_Form_Cohortes extends Form_Cna {

    public function __construct($options = null) {
        parent::__construct($options);
    }

    public function init() {
        $domConfig = Zend_Registry::get('domConfig'); //esto se crea en el bootstrap
        $this->setName('instalaciones');
        $this->setMethod("post");
        $this->setAttrib('enctype', 'multipart/form-data');
        $tableareas = new Generales_Model_Areas();
        $areas = $tableareas->getarrayAreas(-3);
        
        $array_elements[] = new Zend_Form_Element_Hidden("codtab");
        $array_elements[] = new Zend_Form_Element_Hidden("codboton");
        $array_elements[] = new Zend_Form_Element_Hidden("codboton2");
        $array_elements[] = new Zend_Form_Element_Hidden("codcohorte");
        
        $fechanorma = new Zend_Form_Element_Text('fechaiactividades');
		$fechanorma->setLabel('Fecha de inicio de actividades :');
		$fechanorma->setRequired(true);
		$fechanorma->setAttrib("readonly","readonly");
		$array_elements[] = $fechanorma;
        

        $element = new Zend_Form_Element_Text("numero");
        $element->setLabel("Número de cohortes del programa desde su creación : ");
        $element->setRequired(true);
//        $element->setAttrib("readonly", "readonly");
        $element->addValidator('digits');
        $element->setAttrib("size", 7);
        $array_elements[] = $element;
        
        $element = new Zend_Form_Element_Text("cantidad");
        $element->setLabel("Número de graduados del programa desde su creación : ");
        $element->setRequired(true);
        $element->addFilter('StripTags');
        $element->addFilter('StringTrim');
        $element->addValidator('digits');
        $element->setAttrib("size", 7);
        $array_elements[] = $element;
        	    
        $submit = new Zend_Form_Element_Submit('btnSubmit');
        $submit->setValue('Guardar');
        $submit->setLabel("Guardar");
        $submit->setAttrib("class", "iceCmdBtn");
        $array_elements[] = $submit;
       
        $this->addElements($array_elements);
//        $this->loadViewScriptDecorators();
        $this->loadTableDecorators();
    
    }

    public function loadViewScriptDecorators() {
        $this->setDecorators(array(array('viewScript',array('viewScript'=>'viewscripts/cohortes_form.phtml'))));
    }
}